"""
@ProjectName : CourseManagementSystem
@File        : main.py
@Author      : WorldWind(1772830365@qq.com)
@Address     : ChangSha - BoWeiFeng
@Date        : 2025/7/17 下午2:54
"""
# 用户界面
from courses.course_ui import CourseUI

if __name__ == '__main__':
    ui = CourseUI()
    while True:
        result = input(
            '请输入操作:[1.新增课程信息][2.删除课程信息][3.更改课程信息][4.根据可能名查询课程信息][5.查询课程列表][6.退出]:')
        if result == '1':
            ui.add()
        elif result == '2':
            ui.delete()
        elif result == '3':
            ui.update()
        elif result == '4':
            print(ui.searchCourseByName())
        elif result == '5':
            print(ui.searchAll())
        elif result == '6':
            print('退出成功')
            break
        else:
            print('请输入正确选项')
